<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{$title} - ^_^66Play~溜得起飞~</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="{:C('WEB_SITE_KEYWORD')}">
<meta name="description" content="{:C('WEB_SITE_DESCRIPTION')}">
<link href="__ASSETS__/share/css/common.css" style="text/css" rel="stylesheet">
<link href="__ASSETS__/share/css/style.css" style="text/css" rel="stylesheet">
<script type="text/javascript" src="__ASSETS__/share/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="__ASSETS__/share/js/jquery_public.js"></script>
<script type="text/javascript" src="__ASSETS__/share/barrage/ckplayer.js" charset="utf-8"></script>
<script type="text/javascript" src="__ASSETS__/share/barrage/barrage.js" charset="utf-8"></script>
<script type="text/javascript">
	var bgPath='/Home/Share/barrage?id={$video['id']}';//弹幕文件（路径），请自行根据你的程序进行定义，注意文件夹的第一级目录要存在，权限要可写，不加后缀，要修改后缀请到barrage.php里修改
	var isLive=false;//是否是直播，true=是,false=普通
</script>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"0","bdSize":"16"},"share":{}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script>
<script type="text/javascript">
	{:C('GLOBAL_BDHM')}
</script>
</head>
<style>
    form{border-radius: 5px;position: absolute;top: 300px;left:30%;width: 580px;background: #fff;}
    .logout:hover {color: #ff1b1b;}
</style>
<body class="body_bg">
<div class="head">
	<div class="header">
		<img src="__ASSETS__/share/images/LOGO.png"/>
		<li style="width:30%;margin:0;" class="list_title fl">　66Play</li>
		<li class="fr">
			<empty name="userInfo">
			<a href="javascript:" onclick="apply()">登录账号</a>　　<a target="_blank" href="{:U('register')}">注册账号</a>
			<else />
			<a>欢迎你，</a> <a class="id">{$userInfo.nickname}</a>　<a href="#" class="JS_logout logout">退出登录</a>
			</empty>
		</li>
	</div>
</div>
<div class="Tle"><img width="70" height="70" src="{$video.user.avatar}"/>
    <li class="list_title">&nbsp&nbsp&nbsp{$video.title|htmlspecialchars_decode}</li>
    <li class="inf"><span>作者：{$video.user.nickname}</span><span>时间：{$video['create_time']|date="Y-m-d",###}</span><span>所属游戏：{$video.game.name}</span></li>
</div>
<div class="view" id="a1"></div>
<script type="text/javascript">
var flashvars={
	f:'{$video['uri']}',
	c:0,
	b:0,
	loaded:'loadedHandler'
	};
var video=['{$video['uri']}->video/mp4'];
CKobject.embed('__ASSETS__/share/barrage/ckplayer.swf','a1','ckplayer_a1','960','540',false,flashvars,video)
</script>
<!-- <div class="bdsharebuttonbox"><a title="分享到QQ好友" href="#" class="bds_sqq" data-cmd="sqq"></a><a href="#" class="></a><a href="#" class="></a><a href="#" class="></a></div> -->
<div class="foot bdsharebuttonbox">
	<span class="fl">分享到：</span>
	<a href="javascript:" title="分享到QQ好友" class="icon icon_login_name1 bds_sqq" data-cmd="sqq"></a>
	<a href="javascript:" title="分享到QQ空间" class="icon icon_login_name2 bds_qzone" data-cmd="qzone"></a>
	<a href="javascript:" title="分享到新浪微博" class="icon icon_login_name3 bds_tsina" data-cmd="tsina"></a>
	<a href="javascript:" title="分享到微信" class="icon icon_login_name4 bds_weixin" data-cmd="weixin"></a>
	<span class="fr">&nbsp赞：<span id="JS_zan_text">{$video.statis.zan}</span></span>
	<a style="float: right;" class="JS_zan icon icon_login_name5 <notempty name="video.action.is_zan">hover</notempty>"></a>
	</a><span class="fr">人气：{$video.statis.play} </span>
</div>
<div class="view_list">
    <div class="list_titleb">相关视频</div>
    <div class="list_contentBox">
    	<volist name="about_videos" id="vo">
		<div class="list_content">
			<a href="{:U('video', ['id' => $vo['id']])}"><img src="{$vo.thumb}"/><span></span><font></font></a>
			<h2 class="block">{$vo.title}</h2>
			<li><span>观看:</span><span>&nbsp{$vo.statis.play}次</span>&nbsp&nbsp<span>点赞:</span><span>&nbsp{$vo.statis.zan}次</span></li>
		</div>
		</volist>
 
	</div>
</div>
<!-- <div class="view_info">
    <div class="list_titleb">录制说明</div>
    <div><img src="__ASSETS__/share/images/view_info1.jpg"/><img src="__ASSETS__/share/images/view_info2.jpg" alt=""/><img style="padding-right: 0px;" src="__ASSETS__/share/images/view_info3.jpg" alt=""/></div>
    <div class="info">1.录制视频 ------------------------  //> 2.编辑视频 -------------------------- //> 3.上传视频</div>
</div> -->


<!-- login box -->
<div class="loginBox">
	<div class="bg"></div>
	<form class="login_box" action="{:U('User/login')}">
		<a href="javascript:" class="loginBox_close"></a>
		<div class="zc_header">
			登录帐号
		</div>
		<div class="loginInput_list">
			<!-- <div class="inputSt"><span class="inputNum reglistSt"></span>
			<input class="JS_input" name="mobile" type="text" placeholder="手机号" maxlength="11">
			<span class="regTs_text"></span>
			</div>
			<div class="inputSt"><span class="inputPassword reglistSt"></span>
			<input class="JS_input" name="password" type="password" maxlength="16" placeholder="登录密码">
			<span class="regTs_text"></span>
			</div>
			<div class="input_st"><font class="checkboxSt"><input class="JS_input" name="remember" type="checkbox"></font><span class="checkboxSt_text">下次自动登录</span><span class="loginTs_text"></span></div> -->
			<div class="inputSt loginInput_num"><span class="reglistSt inputNum"></span>
			<input type="text" name="mobile" class="JS_input" placeholder="手机号" maxlength="11"><span class="regTs_text"></span></div>
			<div class="inputSt loginInputPassword"><span class="reglistSt inputPassword"></span><input type="password" name="password" class="JS_input" placeholder="登录密码" maxlength="16"><span class="regTs_text"></span></div>
			<div class="input_st"><font class="checkboxSt"><input name="verify" class="JS_input" value="1" type="checkbox"></font><span class="checkboxSt_text">下次自动登录</span><span class="loginTs_text"></span></div>
		</div>
		<a href="#" class="loginBt JS_submit">登录</a>
		<div class="login_btBox">
			<a target="_blank" href="{:U('password')}" class="fl">忘记密码？</a><a target="_blank" href="{:U('register')}" class="fr"><span>注册帐号</span><img src="__ASSETS__/share/images/login_btBox.png"></a>
		</div>
	</form>
</div>
<script>
var isLogin = <empty name="userInfo">0<else />1</empty>;
var video_id = {$video.id};
	$('.JS_submit').click(function(){
		$.ajax({
			url:$('form').attr('action'),
			data:$(".JS_input").serialize(),
			type:'post',
			dataType:'json',
			success:function(data){
				console.log(data);
				if(data.state < 0){
					msg = data.info;
					$(".loginTs_text").html(msg);
					return;
				}else{
					$(".loginTs_text").empty();
					location.reload();
					if (data.url != ''){
						// window.location.href= data.url;
					}
					else{
						
					}
				}
			}
		});
	});

	$('.JS_logout').click(function(){
		$.post('{:U('User/logout')}',{}, function(){
			location.reload();
		});
	});

	$('.JS_zan').click(function(){
		if(!isLogin){
			apply();
			return;
		}

		url = $(this).hasClass('hover') ? '{:U('Like/unLike')}' : '{:U('Like/doLike')}';
		is_zan = $(this).hasClass('hover') ? true: false;
		_this = $(this);
		$.post(url, {type:1, id: video_id}, function(data){
				if(data.state < 0){
					alert(data.info);
					return;
				}else if (data.info == '请登录'){
					apply();
					return;
				}else{
					$('#JS_zan_text').html(data.data.total);
					if (is_zan){
						_this.removeClass('hover');
						is_zan = false;
					}else{
						is_zan = true;
						_this.addClass('hover');
					}
				}	
		});

	});
</script>
<!--#end login box -->
</body>
</html>